Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary order adjustment for WC queries #2577

Merged
merged 2 commits into from
Jan 28, 2022

Conversation

felipeelia
Copy link
Member

Description of the Change

This PR removes an adjustment in the orderby parameter that EP was doing on WooCommerce queries and is no longer needed.

In older versions of WC (apparently until WC 3.0.9, released in June 2017), it was defaulting to menu_order title => ASC: https://github.com/woocommerce/woocommerce/blob/3.0.9/includes/class-wc-query.php#L449

Newer versions are already ordering by relevance DESC, as ElasticPress does.

Closes #2473

Changelog Entry

Changed: to comply with modern WooCommerce behavior, ElasticPress does not change the orderby parameter anymore.

Credits

Props @felipeelia and @beazuadmin

@felipeelia
Copy link
Member Author

Add to readme WC compatibility (last 2 major versions)

@felipeelia felipeelia merged commit e051161 into 4.x.x Jan 28, 2022
@felipeelia felipeelia deleted the fix/keep-wc-orderby branch January 28, 2022 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant